(require 'use-package-ensure)
(setq use-package-always-ensure t)

(use-package auto-compile
  :config (auto-compile-on-load-mode))

(setq load-prefer-newer t)

(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)

(set-window-scroll-bars (minibuffer-window) nil nil)

(setq frame-title-format '("Emacs"))

(global-prettify-symbols-mode t)

(load-theme 'gruvbox-dark-hard t)

(global-hl-line-mode)

(ido-mode)
(column-number-mode)
(winner-mode t)

(setq backup-directory-alist '(("." . "~/.backups")))

(electric-pair-mode)

(add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode))

(add-to-list 'load-path "~/.emacs.d/evil")
(require 'evil)
(evil-mode 1)

(use-package org-bullets
  :init
  (add-hook 'org-mode-hook 'org-bullets-mode))

(setq org-ellipsis "⤵")

(setq org-src-fontify-natively t)

(setq org-html-postamble nil)

(setq browse-url-browser-function 'browse-url-generic
      browse-url-generic-program "abrowser")

(setenv "BROWSER" "abrowser")

(setq tramp-default-method "ssh")

;; Use cperl-mode instead of the default perl-mode
(mapc
  (lambda (pair)
    (if (eq (cdr pair) 'perl-mode)
        (setcdr pair 'cperl-mode)))
  (append auto-mode-alist interpreter-mode-alist))

(defun n-cperl-mode-hook ()
  (setq cperl-indent-level 4)
  (setq cperl-continued-statement-offset 0)
  (setq cperl-extra-newline-before-brace t)
  (set-face-background 'cperl-array-face "wheat")
  (set-face-background 'cperl-hash-face "wheat")
  )
